import request from '@/utils/request'

export function add (data) {
  return request({
    url: 'api/quartz/job/create',
    method: 'post',
    data
  })
}

export function del (id) {
  return request({
    url: 'api/quartz/job/delete/' + id,
    method: 'delete'
  })
}

export function edit (data) {
  return request({
    url: 'api/quartz/job/update',
    method: 'put',
    data
  })
}

export function updateIsPause (id) {
  return request({
    url: 'api/quartz/job/updateIsPause/' + id,
    method: 'put'
  })
}

export function execution (id) {
  return request({
    url: 'api/quartz/job/exec/' + id,
    method: 'put'
  })
}

export function getById (id) {
  return request({
    url: 'api/quartz/job/getById/' + id,
    method: 'get'
  })
}
